/*
 * Term.cpp
 *
 *  Created on: 24 nov. 2013
 *      Author: baker
 */

#include "Term.h"


Term::Term(int i){
	this->_type = Integer;
	this->_valueF = 0;
	this->_valueI = i;
}
Term::Term(float f){
	this->_type = Real;
	this->_valueF = f;
	this->_valueI = 0;
}

float Term::result(){
	if (this->_type == Type::Integer){
		return this->_valueF;
	}else {
		return this->_valueF;
	}
}

Term::~Term() {
	delete this->_type;
	delete this->_valueI;
	delete this->_valueF;
}

